/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jWASA;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * @author gianmariospacagna
 */
public class Sample implements Serializable {
    long timestamp;
    long[] values;
    
    Sensor sensor;

    public long getTimestamp() {
        return timestamp;
    }

    
    
    public int getDim() {
        return values.length;
    }

    public Sensor getSensor() {
        return sensor;
    }

    public long[] getValues() {
        return values;
    }

    public Sample(Long timestamp, long[] values, Sensor sensor) {
        this.timestamp = timestamp;
        this.values = values;
        this.sensor = sensor;
    }
    
    public Sample(){
        
    }
    public String toString(){
        String str="Timestamp: "+this.timestamp;
        str+=" Sensor: "+sensor.getName();
        str+=" Values: ";
        for(long v:values){
            str+=v;
            str+=",";
        }
        str.substring(0, str.length()-1);
        return str;
        
    }
    
    
    
    
}
